

<h1><<用户相关接口>></h1>


<h2>user_info(获取用户信息)</h2>
<form id="user_info" method="get">
<button onclick="ajaxApi('user_info','api.php?c=user&a=user_info')" type="button" name="btn">提交</button>
</form>

<h2>user_update(POST:修改用户信息)</h2>
<form id="user_update" method="post">
diner_num<input name="diner_num" value=""><br>
nick_name<input name="nick_name" value=""><br>
admin_name<input name="admin_name" value=""><br>
sex<input name="sex" value=""><br>
old_password<input name="old_password" value=""><br>
new_password<input name="new_password" value=""><br>
confirm_password<input name="confirm_password" value=""><br>
mobile<input name="mobile" value=""><br>
invoice_title<input name="invoice_title" value=""><br>
<button onclick="ajaxApi('user_update','api.php?c=user&a=user_update','post')" type="button" name="btn">提交</button>
</form>

<h2>address_default(获取用户默认收货地址)</h2>
<form id="address_default" method="get">
<button onclick="ajaxApi('address_default','api.php?c=user&a=address_default','post')" type="button" name="btn">提交</button>
</form>

<h2>address_add(POST:添加收货地址)</h2>
<form id="address_add" method="post">
consignee<input name="consignee" value=""><br>
sex<input name="sex" value=""><br>
province<input name="province" value=""><br>
city<input name="city" value=""><br>
area<input name="area" value=""><br>
address<input name="address" value=""><br>
mobile<input name="mobile" value=""><br>
<button onclick="ajaxApi('address_add','api.php?c=user&a=address_add','post')" type="button" name="btn">提交</button>
</form>

<h2>address_update(POST:修改收货地址)</h2>
<form id="address_update" method="post">
id<input name="id" value=""><br>
consignee<input name="consignee" value=""><br>
sex<input name="sex" value=""><br>
province<input name="province" value=""><br>
city<input name="city" value=""><br>
area<input name="area" value=""><br>
address<input name="address" value=""><br>
mobile<input name="mobile" value=""><br>
default<input name="default" value="">(是否为默认地址:0,1)<br>
<button onclick="ajaxApi('address_update','api.php?c=user&a=address_update','post')" type="button" name="btn">提交</button>
</form>

<h2>cart_info(获取购物车信息)</h2>
<form id="cart_info" method="get">
<button onclick="ajaxApi('cart_info','api.php?c=user&a=cart_info','post')" type="button" name="btn">提交</button>
</form>

<h2>cart_save(POST:订餐信息保存到购物车)</h2>
<form id="cart_save" method="post">
cat_id<input name="cat_id" value=""><br>
booklist<br>
<input size='8' placeholder="20170616" name="booklist[0][bookdate]">
<input size='8' placeholder="12:00-13:00" name="booklist[0][noon]">
<input size='8' placeholder="50" name="booklist[0][noon_num]">
<input size='8' placeholder="19:00" name="booklist[0][night]">
<input size='8' placeholder="60" name="booklist[0][night_num]"><br>
<input size='8' placeholder="20170616" name="booklist[1][bookdate]">
<input size='8' placeholder="17:00-19:00" name="booklist[1][noon]">
<input size='8' placeholder="50" name="booklist[1][noon_num]">
<input size='8' placeholder="19:00" name="booklist[1][night]">
<input size='8' placeholder="60" name="booklist[1][night_num]"><br>
<button onclick="ajaxApi('cart_save','api.php?c=user&a=cart_save','post')" type="button" name="btn">提交</button>
</form>

<h2>order_save(POST:保存订单)</h2>
<form id="order_save" method="post">
consignee<input name="consignee" value=""><br>
province<input name="province" value=""><br>
city<input name="city" value=""><br>
area<input name="area" value=""><br>
address<input name="address" value=""><br>
mobile<input name="mobile" value=""><br>
<button onclick="ajaxApi('order_save','api.php?c=user&a=order_save','post')" type="button" name="btn">提交</button>
</form>

<h2>order_list(POST:获取我的订单)</h2>
<form id="order_list" method="post">
<button onclick="ajaxApi('order_list','api.php?c=user&a=order_list','post')" type="button" name="btn">提交</button>
</form>

<h2>coupon_list(获取优惠券列表)</h2>
<form id="coupon_list" method="get">
<button onclick="ajaxApi('coupon_list','api.php?c=user&a=coupon_list')" type="button" name="btn">提交</button>
</form>

<h2>coupon_use(POST:使用优惠券)</h2>
<form id="coupon_use" method="post">
coupon_id<input name="coupon_id" value="">(0:不使用，>0:使用)<br>
<button onclick="ajaxApi('coupon_use','api.php?c=user&a=coupon_use','post')" type="button" name="btn">提交</button>
</form>

<h2>invoice_use(POST:开发票)</h2>
<form id="invoice_use" method="post">
invoiced<input name="invoiced" value=""> (0:不开，1:开)<br>
invoice_title<input name="invoice_title" value=""><br>
<button onclick="ajaxApi('invoice_use','api.php?c=user&a=invoice_use','post')" type="button" name="btn">提交</button>
</form>